//
//  TTLoginSingle.h
//  TaoTuo
//
//  Created by admin on 2019/8/16.
//  Copyright © 2019 admin. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "TTLoginModel.h"
#import "TTShopCartCodeModel.h"
@class TTUserModel;

NS_ASSUME_NONNULL_BEGIN

@interface TTLoginSingle : NSObject

@property (nonatomic, assign) BOOL isLogin;     // 是否登录了
@property (nonatomic, assign) BOOL mineDianpuShow;    // 我的页面中店铺是否展示

@property (nonatomic, strong, nullable) TTLoginModel *loginModel; // 登录信息
@property (nonatomic, strong, nullable) TTUserModel *userModel;   // 用户信息

///美元汇率
@property (nonatomic, assign) CGFloat dollarRate;

@property (nonatomic, strong) NSMutableDictionary *marketDic;   // 保存行情中心的开关状态
@property (nonatomic, strong) NSMutableDictionary *unLoginMarketDic;   // 未登录时保存行情中心的开关状态

//购物车商品数量
@property (nonatomic, assign) int shopCartCount;
// 购物车商品条码
@property (nonatomic, strong,  nullable) NSArray<TTShopCartCodeModel *> *cartCodeArray;

// 登录之后的信号，0：退出登录，1：登录
@property (nonatomic, strong) RACSubject *loginSubject;

// 通知购物车刷新
@property (nonatomic, strong) RACSubject *shopCartSubject;

// 点击购物车选中按钮
@property (nonatomic, strong) RACSubject *shopCartSelectBtnSubject;

// 添加收货地址成功的信号
@property (nonatomic, strong) RACSubject *addAddressSuccessSubject;

@property (nonatomic, strong) NSDictionary *routeTitleDic;  // 路由跳转标题

@property (nonatomic, copy) NSString *alipaySuccessNotifyKey;   // 支付成功通知的key

+ (instancetype)sharedSingle;




/**
 登录成功之后，设置用户数据
 */
+ (void)setupUserDataWithModel:(TTLoginModel *)model;


/**
 清除用户信息
 */
+ (void)deleteUserInfo;



/**
 查询裸石size
 */
+ (int)findDiamondSizeWithSize:(CGFloat)diaSize;



/**
 保存金价开关状态
 */
+ (void)saveGoldStatus;

///查看证书
+ (void)lookCertificateWithUrlString:(NSString *)urlString;


@end

NS_ASSUME_NONNULL_END
